#define _CRT_SECURE_NO_WARNNING
#include <stdio.h>
#define SIZE 8
void Display(int arr[]) {
	int i = 0;
	for (i = 0; i < SIZE; i++) {
		printf("%d", arr[i]);
	}
	printf("\n");
}
void Swap(int* p, int* q) {
	int temp = *p;
	*p = *q;
	*q = temp;
}
void ExchangePlates() {
	int arr[SIZE] = { 0 };
	int i = 0;
	for (i = 0; i < SIZE; i += 2) {
		arr[i] = 1;
	}
	for (i = 1; i < SIZE; i += 2) {
		arr[i] = 0;
	}
	Display(arr);
	for (i = 0; i < SIZE/2; i++) {
		int j = 0;
		for (j = i; j < SIZE - i; j+=2) {
			Swap(&arr[j], &arr[j + 1]);
		}
		Display(arr);
	}

}
int main() {
	ExchangePlates();
	return 0;
}